<template>
  <div>
   <Hotheader :seller="seller"></Hotheader>
		<div class="tab border-1px">
			<div class="tab-item">
				<a v-link = "{path:'/goods'}">商品</a> 
			</div>
			<div class="tab-item">
				<a v-link = "{path:'/ratings'}">评论</a> 
			</div>
			<div class="tab-item">
				<a v-link = "{path:'/seller'}">商家</a>
			</div>
		</div>

		<router-view :seller = "seller" keep-alive></router-view>
  </div>
</template>
	
<script>
import Hotheader from './components/header/Hotheader.vue';
export default {
		data:function(){
				return {
					seller:{}
				}
		},
    components: {
        Hotheader
    },
		created:function(){
			this.$http.get('/api/seller')
			.then(function(data){
				//console.log(data.body)
				var res  = data.body
				if(res.errno == 0 && res.data){					 
						this.seller = res.data
						//console.log(this.seller)
				}
			})
		}
};
</script>

<style lang="stylus" scoped="scoped">
	@import './common/stylus/index.styl'
	.tab
		display: flex
		width: 100%
		height: 40px
		line-height: 40px
		border-1px(rgba(7,17,27,0.1))

	.tab-item {
		flex: 1;
		text-align: center;
	}
	.tab-item a{
		display: block;
		text-decoration: none;
		font-size: 14px;
		color: rgb(77,85,93);
	}
	a.active {
		color: rgb(240,20,20);
	}
</style>
